﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IWebSiteFolder.cs" company="">
//   
// </copyright>
// <summary>
//   Abstraction over the virtual files/directories of a web site.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Skymate.Core.IO.WebSite
{
    using System.Collections.Generic;
    using System.IO;

    /// <summary>
    ///     Abstraction over the virtual files/directories of a web site.
    /// </summary>
    public interface IWebSiteFolder
    {
        /// <summary>
        /// The list directories.
        /// </summary>
        /// <param name="virtualPath">
        /// The virtual path.
        /// </param>
        /// <returns>
        /// The <see cref="IEnumerable"/>.
        /// </returns>
        IEnumerable<string> ListDirectories(string virtualPath);

        /// <summary>
        /// The list files.
        /// </summary>
        /// <param name="virtualPath">
        /// The virtual path.
        /// </param>
        /// <param name="recursive">
        /// The recursive.
        /// </param>
        /// <returns>
        /// The <see cref="IEnumerable"/>.
        /// </returns>
        IEnumerable<string> ListFiles(string virtualPath, bool recursive);

        /// <summary>
        /// The file exists.
        /// </summary>
        /// <param name="virtualPath">
        /// The virtual path.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        bool FileExists(string virtualPath);

        /// <summary>
        /// The read file.
        /// </summary>
        /// <param name="virtualPath">
        /// The virtual path.
        /// </param>
        /// <returns>
        /// The <see cref="string"/>.
        /// </returns>
        string ReadFile(string virtualPath);

        /// <summary>
        /// The copy file to.
        /// </summary>
        /// <param name="virtualPath">
        /// The virtual path.
        /// </param>
        /// <param name="destination">
        /// The destination.
        /// </param>
        void CopyFileTo(string virtualPath, Stream destination);
    }
}